<template>
  <div class="header">
    <div class="header-top">
      <a href="#" target="_href" @click="handleLoginOut"
        ><el-icon><SwitchButton /></el-icon>退出</a
      >
    </div>
    <div class="header-title">永州市疲劳驾驶查询平台</div>
  </div>
</template>

<script setup lang="ts" name="header">
import { useRouter } from "vue-router";
const router = useRouter();

const handleLoginOut = () => {
  localStorage.setItem("userToken", "");
  // 重定向到主页
  router.push("/");
};
</script>
